package com.member.common.enums;

import lombok.Getter;

import java.util.Objects;

@Getter
public enum ImportFailEnum {

    REGISTER_MEMBER_IMPORT(1,"注册会员导入"),
    RECHARGE_IMPORT(2,"充值导入"),
    ORDER_SHIPPING(3,"订单发货"),
    EVALUATION_IMPORT(4,"评价导入")
    ;
    private final Integer key;
    private final String desc;

    ImportFailEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static ImportFailEnum getByKey(Integer _key) {
        for (ImportFailEnum item : ImportFailEnum.values()) {
            if (Objects.equals(item.getKey(), _key)) {
                return item;
            }
        }
        return null;
    }
}
